import axios from 'axios';

const request = axios.create({
  baseURL: 'http://localhost:6605/api',
  timeout: 10000
});

request.interceptors.response.use(
  res => res.data,
  err => {
    console.error('请求错误:', err);
    window.$message && window.$message.error(err.message);
    return Promise.reject(err);
  }
);

export default request; 